package com.liulei.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liulei.entities.Worker;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * WorkerMapper 是一个映射器，他在数据库表的字段和Java实体类之间做映射
 */

@Repository
public interface WorkerMapper extends BaseMapper<Worker> {
    /**
     * 调整送水工工资，在原有基础上增加100
     * @param wid 送水工ID
     * @param workerSalary 送水工工资
     * @return 受影响行数。大于0调整工资成功，否则调整工资失败
     */
    int adjustSalary(@Param("wid") Integer wid,@Param("workerSalary")Integer workerSalary);

    int reduceSalary(@Param("wid") Integer wid,@Param("workerSalary")Integer workerSalary);
}
